package com.dh.weibo.pojo;

import com.dh.weibo.util.DateTimeUtil;
import com.dh.weibo.util.IDUtil;

import java.io.Serializable;

public class WeiBo extends Base implements Serializable {
    private static final long serialVersionUID = -2095392008162534141L;
    private String id;
    private String title;
    private String content;
    private String uid;// 谁发的微博
    private Integer comment;// 评论
    private Integer collection;//收藏
    private Integer like;

    public WeiBo(String title, String content, String uid) {
        super(DateTimeUtil.getCurrentTimeMillis(), DateTimeUtil.getCurrentTimeMillis());
        this.id = IDUtil.createID();
        this.title = title;
        this.content = content;
        this.uid = uid;
        this.comment = 0;
        this.collection = 0;
        this.like = 0;
    }



    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public Integer getComment() {
        return comment;
    }

    public void setComment(Integer comment) {
        this.comment = comment;
    }

    public Integer getCollection() {
        return collection;
    }

    public void setCollection(Integer collection) {
        this.collection = collection;
    }

    public Integer getLike() {
        return like;
    }

    public void setLike(Integer like) {
        this.like = like;
    }

    public String getId() {
        return id;
    }

    @Override
    public String toString() {
        return "WeiBo{" +
                "id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", uid='" + uid + '\'' +
                ", comment=" + comment +
                ", collection=" + collection +
                ", like=" + like +
                '}';
    }
}
